home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: vrhell@ix.netcom.com(Linda Darcy )
- Newsgroups: comp.lang.c
- Subject: getche error
- Date: 24 Mar 1996 16:07:15 GMT
- Organization: Netcom
- Message-ID: <4j3rvj$8bg@ixnews3.ix.netcom.com>
- NNTP-Posting-Host: ix-ron-ny6-26.ix.netcom.com
- X-NETCOM-Date: Sun Mar 24 8:07:15 AM PST 1996
-
- I was working on app, and I found that as I tried to compile the
- program at the end it gave me:
-
- Compiling...
- c:\msvc\bin\64-1book.c
- c:\msvc\bin\64-1book.c(13) : warning C4013: '_cputs' undefined;
- assuming extern returning int
- c:\msvc\bin\64-1book.c(16) : warning C4013: '_getch' undefined;
- assuming extern returning int
- c:\msvc\bin\64-1book.c(19) : warning C4013: '_putch' undefined;
- assuming extern returning int
- Linking...
-
- 64-1BOOK.OBJ(c:\msvc\bin\64-1book.c) : error L2029: '__putch' :
- unresolved external
- 64-1BOOK.OBJ(c:\msvc\bin\64-1book.c) : error L2029: '__cputs' :
- unresolved external
- 64-1BOOK.OBJ(c:\msvc\bin\64-1book.c) : error L2029: '__getch' :
- unresolved external
-
- LINK returned error code 2.
- Creating browser database...
- 64-1BOOK.EXE - 3 error(s), 3 warning(s)
-
- Just so you don't think I'm stupid. I'll also include the code, which
- is perfectly valid as I can see. I tried the getchar command, so I
- don't believe it's a problem with the header file, and just to play it
- safe I had a few other people send me their <conio.h> header. Also, I
- thought maybe there was something so small that I wasn't noticing about
- the code, that was giving me the error. So I took an example out of the
- help files, and tried to compile it with the same errors. I've been
- using MSVC++ v1.52 for a long time, but I've never had an error with
- it. If there is some sort of error, I'd be greatful for someone to tell
- me. Oh, by the way here's that code:
-
-
-
-
-
- /* GETCH.C: This program reads characters from
- * the keyboard until it receives a 'Y' or 'y'.
- */
- #include <conio.h>
- #include <ctype.h>
- void main( void )
- {
- int ch;
- _cputs( "Type 'Y' when finished typing keys: " );
- do
- {
- ch = _getch();
- ch = toupper( ch );
- } while( ch != 'Y' );
- _putch( ch );
- _putch( '\r' ); /* Carriage return */
- _putch( '\n' ); /* Line feed */
- }
-
-
-
-
- Obviously you know what this snippet is for. As far as I can tell it
- shouldn't have any errors. Well any information about what I could do
- to fix this problem would be greatly appreciated, thanks.
-
- -VR-
-